<template>
  <van-nav-bar
    title="用户中心"
    left-text="返回"
    left-arrow
    @click-left="$router.back()"
  />

  <van-field v-model="tel" type="tel" label="请输入手机号" />
  <van-button @click="submit" :disabled="tel.length !== 11" round type="danger"
    >确定</van-button
  >
</template>

<script setup lang="ts">
import { ref } from "vue";
import { Dialog, Toast } from "vant";
import { useRouter } from "vue-router";

const tel = ref("");
const router = useRouter();
const submit = () => {
  Dialog.confirm({
    title: "标题",
    message: `你搁着发尼玛的短信验证码呢${tel.value}`,
  }).then(() => {
    router.push({
      path: "/registtwo",
      query: {
        tel: tel.value,
      },
    })
  })
  .catch(() => {
      console.log("我取消了");
    });
  
};
</script>

<style lang="scss" scoped>
.van-cell {
  margin-top: 80px;
  margin-bottom: 40px;
}
</style>
